<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">
	<%
	ApplicationModel applicationModel = (ApplicationModel)request.getAttribute("applicationModel");
	List<ChannelModel> tagList = (List<ChannelModel>)request.getAttribute("channelList");
	List<ArticleModel> articleList = (List<ArticleModel>)request.getAttribute("articleList");
	%>
	<url>
		<loc>http://<%=applicationModel.getApplicationId() %>.appspot.com/</loc>
		<lastmod><%=applicationModel.getLastmodOfFormat() %></lastmod>
		<changefreq>monthly</changefreq>
		<priority>1.0</priority>
		<mobile:mobile/>
	</url>
	<%
	for(ChannelModel channelModel: tagList) {
	%>
	<url>
		<loc>http://<%=applicationModel.getApplicationId() %>.appspot.com/<%=channelModel.getKeyString() %>.html</loc>
		<lastmod><%=channelModel.getLastmodOfFormat() %></lastmod>
		<changefreq>monthly</changefreq>
		<priority>0.8</priority>
		<mobile:mobile/>
	</url>
	<%
		List<CategoryModel> categoryList = channelModel.getCategoryModelListRef().getModelList();
		for(CategoryModel categoryModel: categoryList) {
			List<ChapterModel> chapterList = categoryModel.getChapterModelListRef().getModelList();
			for(ChapterModel chapterModel: chapterList) {
				if(chapterModel.getPublicFlg() != null && chapterModel.getPublicFlg()) {
	%>
	<url>
		<loc>http://<%=applicationModel.getApplicationId() %>.appspot.com/<%=channelModel.getKeyString() %>/c<%=chapterModel.getKeyString() %>.html</loc>
		<lastmod><%=chapterModel.getLastmodOfFormat() %></lastmod>
		<changefreq>monthly</changefreq>
		<priority>0.5</priority>
		<mobile:mobile/>
	</url>
	<%
					List<PageModel> pageList = chapterModel.getPageModelListRef().getModelList();
					for(PageModel pageModel: pageList) {
						if(pageModel.getPublicFlg()) {
	%>
	<url>
		<loc>http://<%=applicationModel.getApplicationId() %>.appspot.com/<%=channelModel.getKeyString() %>/c<%=chapterModel.getKeyString() %>/page<%=pageModel.getKeyString() %>.html</loc>
		<lastmod><%=pageModel.getLastmodOfFormat() %></lastmod>
		<changefreq>monthly</changefreq>
		<priority>0.3</priority>
		<mobile:mobile/>
	</url>
	<%					} %>
	<%				} %>
	<%			} %>
	<%		} %>
	<%	} %>
	<%} %>
	<%
	for(ArticleModel articleModel: articleList) {
	%>
	<url>
		<loc>http://<%=applicationModel.getApplicationId() %>.appspot.com/article/<%=articleModel.getKeyString() %></loc>
		<lastmod><%=articleModel.getLastmodOfFormat() %></lastmod>
		<changefreq>monthly</changefreq>
		<priority>0.5</priority>
		<mobile:mobile/>
	</url>
	<%} %>
</urlset>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<%@ page import="jp.co.cos.ittrick.channel.model.ApplicationModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.ChannelModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.CategoryModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.ChapterModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.PageModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.PreModel" %>
<%@ page import="jp.co.cos.ittrick.channel.model.ArticleModel" %>
<%@ page import="java.util.List" %>